﻿// Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.

using System;

class PrintNumbersNotDivisibleBy3and7
{
    static void Main()
    {
        Console.Write("Enter number N : ");
        string strN = Console.ReadLine();
        int n;
        while (!int.TryParse(strN, out n))
        {
            Console.Write("Invalid input! Please, enter N again : ");
            strN = Console.ReadLine();
        }

        for (int i = 1; i <= n; i++)
        {
            if ((i % 3 == 0) && (i % 7 == 0))
            {
                continue;
            }
            else
            {
                Console.WriteLine("Number : " + i);
            }
        }
    }
}
